package com.xsmart.oa.api.mall.mymenu;

import com.xsmart.common.entity.RequestBean;
import com.xsmart.oa.services.mall.mymenu.PwdManagerService;
import com.xsmart.oa.services.mall.mymenu.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/api")
public class PwdManagerController {
    @Autowired
    RegisterService registerService;
    @Autowired
    PwdManagerService pwdManagerService;

    @RequestMapping(value = "/v1/PwdManagerService/forgetPwd", method = RequestMethod.POST)
    @ResponseBody
    public Object forgetPwd(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return pwdManagerService.forgetPwd(requestBean);
    }

    @RequestMapping(value = "/v1/PwdManagerService/updatePwd", method = RequestMethod.POST)
    @ResponseBody
    public Object updatePwd(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return pwdManagerService.updatePwd(requestBean);
    }

    @RequestMapping(value = "/v1/PwdManagerService/setPwd", method = RequestMethod.POST)
    @ResponseBody
    public Object setPwd(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return pwdManagerService.setPwd(requestBean);
    }





}
